﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserRegister.aspx.cs" Inherits="sWarranty.WEB.UserRegister" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../CSS/table.css" />
    <link rel="stylesheet" type="text/css" href="../CSS/Menu.css" />
    <script src="../JS/jquery-1.8.2.js" type="text/javascript"></script>
    <script src="../JS/notify.js" type="text/javascript"></script>
    <link href="../CSS/notify.css" rel="stylesheet" type="text/css" />
    <script>
        function openPopUp(popUrl, type) {
            var name = 'popUp';
            var appearence = 'dependent=no,menubar=no,resizable=yes,scrollbars=1,' +
                  'status=yes,toolbar=yes,titlebar=yes,' +
                  'width=' + window.screen.availWidth * 80 / 100 + ', height=' + window.screen.availHeight * 80 / 100 + ',resizable:yes,center:yes';
            var openWindow = '';
            if (type == 'open')
                openWindow = window.open(popUrl, name, appearence);
            if (type == 'popup')
                openWindow = window.showModalDialog(popUrl, name, appearence);
            openWindow.focus();
        }
        function ShowUserData(email) {
            $('#imgLoadingxyz').show();
            var options = {
                type: 'POST',
                url: 'WebService1.asmx/ShowUserData',
                data: '{email: "' + email + '"}',
                contentType: 'application/json; charset=utf-8',
                dataType: 'json',
                success: function (msg) { //msg.d = VN123456|NGUYEN THI A|HN HR & ACOUNT
                    var lines = (msg.d).split('|');
                    var empNo = '';
                    var fullName = '';
                    var dept = '';
                    $.each(lines, function (key, line) {
                        empNo = lines[0];
                        fullName = lines[1];
                        dept = lines[2];
                    });
                    $('#lblEmpNo').text(empNo);
                    $('#lblFullName').text(fullName);
                    $('#lblDept').text(dept);

                    $('#imgLoadingxyz').hide();
                },
                error: function (msg) {
                    $('#imgLoadingxyz').hide();
                }
            };
            $.ajax(options);
        }
        
    </script>
</head>
<body >
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ksdjfl" runat="server">
    </asp:ScriptManager>
    <div class="TitleCont">
        Register new User
    </div>
    <div style="display: none;">
        <asp:TextBox ID="txtAccount2" runat="server" ClientIDMode="Static" ></asp:TextBox>
        <asp:TextBox ID="txtEmpNo2" runat="server" ClientIDMode="Static" Visible="true"></asp:TextBox>
        <asp:TextBox ID="txtFullName2" runat="server" ClientIDMode="Static" Visible="true"></asp:TextBox>
        <asp:TextBox ID="txtDept2" runat="server" ClientIDMode="Static" Visible="true"></asp:TextBox>
    </div>
    <div class="Mid2">
        <div class="Search2">
            <table id="newspaper-b" summary="2007 Major IT Companies' Profit">
                <tbody>
                    <tr>
                        <td class="BackGround-gray">
                            Account
                        </td>
                        <td>
                            <asp:TextBox ID="txtAccount" runat='server' ClientIDMode="Static" Enabled="false"></asp:TextBox>
                            &nbsp;
                            <asp:Button ID="btnSelect" runat="server" Width="40px" CssClass="button" Text="..." />
                            &nbsp;
                            <img id="imgLoadingxyz" src='../images/oader-grey.gif' style="display: none;" />
                        </td>
                        <td class="BackGround-gray" rowspan="2">
                            Avatar
                        </td>
                        <td rowspan="2">
                            <img src='../images/user-group-icon.png' width='56px' height='56px' />
                        </td>
                    </tr>
                    <tr>
                        <td class="BackGround-gray">
                            Employee No
                        </td>
                        <td>
                            <asp:Label ID="lblEmpNo" ClientIDMode="Static" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="BackGround-gray">
                            Full Name
                        </td>
                        <td>
                            <asp:Label ID="lblFullName" ClientIDMode="Static" runat="server"></asp:Label>
                        </td>
                        <td class="BackGround-gray">
                            Password
                        </td>
                        <td>
                            <asp:TextBox ID="txtPass" runat="server" TextMode="Password"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="BackGround-gray">
                            Department
                        </td>
                        <td>
                            <asp:Label ID="lblDept" runat="server"></asp:Label>
                        </td>
                        <td class="BackGround-gray">
                            Confirm
                        </td>
                        <td>
                            <asp:TextBox ID="txtConfirm" runat="server" TextMode="Password"></asp:TextBox>
                        </td>
                    </tr>
                </tbody>
            </table>
            <div style="padding-bottom: 10px;">
            </div>
            <div class="TitleCont">
                Authority
            </div>
            <table id="newspaper-b" summary="2007 Major IT Companies' Profit">
                <tbody>
                    <tr>
                        <td class="BackGround-gray">
                            Authority Level
                        </td>
                        <td>
                            <asp:DropDownList ID="dropAuthority" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="BackGround-gray">
                            Region Data View</td>
                        <td>
                            <asp:DropDownList ID="dropUserRegion" runat="server">
                                <asp:ListItem Value="00" Text="All"></asp:ListItem>
                                <asp:ListItem Value="01" Text="NORTH"></asp:ListItem>
                                <asp:ListItem Value="02" Text="MIDDLE"></asp:ListItem>
                                <asp:ListItem Value="03" Text="SOUTH"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <tr>
            <td colspan="4">
                <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" CssClass="button Float-right"
                    Width="80px" Text="Save" />
            </td>
        </tr>
        <div class="Clear_both">
        </div>
    </div>
    </form>
</body>
</html>
